/PROG  PNS0051
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53301125";
PROG_SIZE	= 3268;
CREATE		= DATE 15-07-16  TIME 16:38:36;
MODIFIED	= DATE 25-02-25  TIME 21:47:58;
FILE_NAME	= PNS0011;
VERSION		= 0;
LINE_COUNT	= 115;
MEMORY_SIZE	= 3736;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0051 ;
   7:  !  PART:53301125  ;
   8:  !ZYL15-7-16********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED]=10    ;
  24:  OVERRIDE=R[5:SPEED] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  PAUSE ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[8:P1 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  R[5:SPEED]=100    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED] ;
  56:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT100 ACC100 TA R[20]sec,DO[5:TO RL1 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P1 PARTS OUT]=PULSE,1.0sec ;
  64:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  65:   ;
  66:  LBL[30:GOTO DROP POUNCE] ;
  67:J P[8:DROP POUNCE] 100% CNT100 ACC110 BREAK    ;
  68:   ;
  69:  TIMER[3]=STOP ;
  70:  LBL[40:AT DROP POUNCE] ;
  71:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  72:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  73:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  74:  JMP LBL[40] ;
  75:   ;
  76:  LBL[50:MOVE DROP SNEAK] ;
  77:  TIMER[3]=START ;
  78:  OVERRIDE=R[5:SPEED] ;
  79:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  80:  LBL[51:DROP OR C-P-S] ;
  81:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  82:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  83:  JMP LBL[51] ;
  84:  JMP LBL[50] ;
  85:   ;
  86:  LBL[60:MOVE CLS-PRS-ACC] ;
  87:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  88:  PAUSE ;
  89:  JMP LBL[30] ;
  90:   ;
  91:  LBL[80:DROP ENABLED] ;
  92:  TIMER[3]=START ;
  93:  !PROCEED TO DROP ;
  94:  OVERRIDE=R[5:SPEED] ;
  95:J P[10:DROP APPROACH] 100% CNT100 ACC100    ;
  96:  MONITOR END Z_CHECH ;
  97:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  98:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
  99:  PAYLOAD[3] ;
 100:  CALL CHK_DROP    ;
 101:   ;
 102:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 103:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 104:  !GOTO PICK POUNCE ;
 105:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 106:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 107:  JMP LBL[10] ;
 108:   ;
 109:  LBL[90:END OF CYCLE] ;
 110:  TIMER[1]=STOP ;
 111:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 112:J P[1:MIDDLE] 50% CNT100    ;
 113:  MOVE TO HOME    ;
 114:   ;
 115:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1320.321  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2161.989  mm,	Y =  1576.000  mm,	Z = -1006.911  mm,
	W =   179.439 deg,	P =      .436 deg,	R =   142.050 deg,
	E1=   142.100 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2654.769  mm,	Y =  3285.201  mm,	Z =  -897.280  mm,
	W =   179.479 deg,	P =     -.398 deg,	R =    88.167 deg,
	E1=   195.857 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2654.769  mm,	Y =  3285.201  mm,	Z = -1051.693  mm,
	W =   179.479 deg,	P =     -.398 deg,	R =    88.167 deg,
	E1=   195.857 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2654.769  mm,	Y =  3285.201  mm,	Z =  -828.000  mm,
	W =   179.479 deg,	P =     -.398 deg,	R =    88.167 deg,
	E1=   195.857 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2126.646  mm,	Y =  1467.533  mm,	Z =  -851.720  mm,
	W =   179.491 deg,	P =      .507 deg,	R =   147.093 deg,
	E1=   137.069 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2103.845  mm,	Y = -1173.335  mm,	Z =  -856.699  mm,
	W =  -179.530 deg,	P =      .624 deg,	R =  -154.211 deg,
	E1=    78.520 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2364.045  mm,	Y = -2407.921  mm,	Z =  -846.957  mm,
	W =  -179.198 deg,	P =      .140 deg,	R =  -123.367 deg,
	E1=    47.749 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2684.999  mm,	Y = -3311.359  mm,	Z =  -834.000  mm,
	W =  -179.309 deg,	P =     -.493 deg,	R =   -90.914 deg,
	E1=    15.370 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2686.336  mm,	Y = -3312.132  mm,	Z = -1142.299  mm,
	W =  -179.316 deg,	P =     -.487 deg,	R =   -90.914 deg,
	E1=    15.369 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2686.336  mm,	Y = -3312.131  mm,	Z = -1116.379  mm,
	W =  -179.316 deg,	P =     -.487 deg,	R =   -90.913 deg,
	E1=    15.369 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2208.529  mm,	Y = -1781.685  mm,	Z = -1017.076  mm,
	W =  -179.336 deg,	P =      .427 deg,	R =  -139.735 deg,
	E1=    64.079 deg
};
/END
